#include "CChat.h"

CChat::CChat()
{
    CTcpNetwork::get_instance_chat()->connect(MStaticData::chat_hostname, MStaticData::chat_port);
    CTcpNetwork::get_instance_chat()->send("new_chat");
    CTcpNetwork::get_instance_chat()->send(MStaticData::username);
}

CChat::~CChat()
{

}

void CChat::send_message(QString message)
{
    CTcpNetwork::get_instance_chat()->send("chat");
    CTcpNetwork::get_instance_chat()->send(MStaticData::username);
    CTcpNetwork::get_instance_chat()->send(message);
}
